﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Themes/Default/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<Fashion.ViewModels.AddProductViewModel>" %>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Submenu" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="NoFormMainContent" runat="server">
                
    <form action="/Admin/Create" method="post" enctype="multipart/form-data">
    <table>
        <tr>
            <td>
                Product Name:
            </td>
            <td>
                <input id="ProductName" type="text" name="ProductName" />
            </td>
        </tr>
        <tr>
            <td>
                Category
            </td>
            <td>
            <%var index = 0;
              foreach (var category in Model.Category)
              {%>
            <input name="CategoryID" type="radio" id="Cat_<%: Model.CatID[index] %>" value = "<%: Model.CatID[index] %>" />
            <label for="Cat_<%:Model.CatID[index] %>"><%:category %></label> <br />
            <%
                index = index + 1;
              } %>
                
            </td>
        </tr>
        <tr>
            <td>
                Brand
            </td>
            <td>
            <%index = 0;
              foreach (var brand in Model.Brand)
              {
                  %>
            <input name="BrandID" type="radio" id="Brand_<%: Model.BrandID[index]%>" value = "<%: Model.BrandID[index] %>" />
            <label for="Cat_<%:Model.BrandID[index] %>"><%:brand %></label> <br />
            <%
                index = index + 1;
              } %>
              </td>
        </tr>
        <tr>
            <td>
                Price:
            </td>
            <td>
                <input id="Price" type="text" name="Price" />
            </td>
        </tr>
        <tr>
            <td>
                ImageList:
            </td>
            <td>
                <input type="file" name="ImageList" id="ImageList" />
            </td>
        </tr>
        <tr>
            <td>
                Sex
            </td>
            <td>
                <select name="Sex" id="Sex">
                <option value="Female">Female</option>
                <option value="Male">Male</option>
                </select>
            </td>
        </tr>
        <tr>
        
            <td>
                Color
            </td>
                       

            <td>
            <% index = 0;
                foreach (var color in Model.Color)
               {%>
               <input type="radio" id="Color_<%: Model.ColorID[index] %>" name="ColorID" value="<%: Model.ColorID[index] %>" />
               <label for="<%: Model.ColorID[index] %>"><%:color %></label>
                           <% 
                           index = index + 1;
                           } %>
            </td>

        </tr>
                <tr>
            <td>Size:</td>
            <td>
            <%
                foreach (var size in Model.Size)
               {%>
               <input type="checkbox" id="Size_<%: size %>" name="SizeList" value="<%: size %>" />
               <label for="Size_<%: size %>"><%:size %></label>
                           <% 
                           } %>
            </td>
        </tr>
        <tr>
            <td>
                Description:
            </td>
            <td>
            <input type="text" name="Description" id="Description" value="abc" />
            </td>
        </tr>

    </table>
    <input type="submit" value="Save" />
    </form>


</asp:Content>
